package com.sunlands.zlcx.usercenter.repository;

import com.sunlands.zlcx.usercenter.domain.UserMonthLearnDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


@Repository
public interface UserMonthLearnRepository extends JpaRepository<UserMonthLearnDO, Long>, JpaSpecificationExecutor<UserMonthLearnDO> {

   @Query(value = "select * from tz_user_month_learn where user_id = ?1 and year_months = ?2", nativeQuery = true)
   UserMonthLearnDO findByUserIdAndYearMonths(Integer userId, String yearMonths);
}

